package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.device.HLDevice;

public class HLClassDevice extends HLLibClass {
    public HLClassDevice(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLDevice();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLDevice.GetCurrentDevice();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDevice.GetCurrentDevice());
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                HLDevice.GetCurrentModel();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLDevice.GetCurrentModel());
            }
            break;
        }
        case 2: {
            HLDevice.StartDeviceMotion();
            break;
        }
        case 3: {
            HLDevice.StopDeviceMotion();
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                HLDevice.GetDeviceMotion();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDevice.GetDeviceMotion());
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                HLDevice.GetLanguageID();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLDevice.GetLanguageID());
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                HLDevice.GetLanguage();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDevice.GetLanguage());
            }
            break;
        }
        case 7: {
            HLDevice.NoLockScreen(args.GetBoolean(0));
            break;
        }
        case 8: {
            if (resultOwnerObject == null) {
                HLDevice.GetLanguageByID(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDevice.GetLanguageByID(args.GetInt(0)));
            }
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                HLDevice.GetCountry();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDevice.GetCountry());
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                HLDevice.GetPlatform();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDevice.GetPlatform());
            }
            break;
        }
        }
    }
}
